from oasys import get_app, db  # 9.导入配置文件
from config import Config  # 7 导入config
from flask_script import Manager
from flask_migrate import MigrateCommand

app = get_app(Config)  # 8.获取对象
# 使用manage
manage = Manager(app)
# 添加命令
manage.add_command('db', MigrateCommand)

if __name__ == '__main__':
    # db.create_all(app=app)
    manage.run()
    # app.run(debug=True)  # 10.run
